package defs

//自定义错误结构
type AppError struct {
	Code    int64
	Message string
}

func NewErrorMsg(code int64, msg string) *AppError {
	return &AppError{code, msg}
}

var (
	//系统错误
	Error_ServerError = NewErrorMsg(10000, "服务器错误")
	Error_ArgsError   = NewErrorMsg(10001, "参数错误")
	//用户
	Error_UserNameOrPswError = NewErrorMsg(20002, "用户名或密码错误")
	Error_UserNotFind        = NewErrorMsg(20003, "用户名不存在")
	Error_UserExist          = NewErrorMsg(20004, "手机号码已存在")
)
